#include <head.h>
// 将数据 写入管道内 

int main(int argc, char const *argv[])
{
    int fd = open( "my_fifo" , O_WRONLY);
    OPEN_ERR(fd);
    printf("写端\n");
    char buf_write[128];
    while (1)
    {
        memset(buf_write , 0 , sizeof(buf_write));
        printf("写入:");
        scanf("%s" , buf_write);
        if (strcmp( buf_write , "quit" ) == 0)
        {
            write( fd , buf_write , strlen(buf_write) );
            printf("写端 退出\n");
            break;
        }
        write( fd , buf_write , strlen(buf_write) );
        // usleep(50000);
    }
    



    return 0;
}


